package com.eden.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

/**
 * ClassName: BasisInfo
 * Package: com.eden.entity
 * Description: todo
 * Date:  2020/10/19 9:09
 *
 * @Author: 李秉林
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class BasisInfo implements Serializable {
	private static final long serialVersionUID = 123123L;
	private String project;                        // 项目名
	private String author;                        //	作者
	private String version;                        //	版本号
	private String createTime;                     //	创建时间
	private String agile;                        //	创建时间毫秒级  ps:主要用于生成序列化ID
	// 数据库
	private String dbUrl;                        //	数据库连接url
	private String dbName;                        //	数据库用户名
	private String dbPassword;                     //	数据库密码
	private String database;                     //	数据库名
	private String table;                        //	数据库表名
	// 实体类
	private String entityName;                     //	实体类名
	private String lowerEntityName;                //	小写实体类名
	private String entityComment;                  //	实体类描述
	private String entityUrl;                     //	实体类路径
	// mapper
	private String mapperName;                     // mapper名称
	private String mapperUrl;                     //	mapper路径
	// mapper.xml
	private String mapperXmlName;                     // mapperXML名称
	private String mapperXmlUrl;                  // mapperXML路径
	// service
	private String serviceName;                  // service名称
	private String serviceUrl;                     //	service路径
	// controller
	private String controllerName;               // controller名称
	private String controllerUrl;                  //	controller路径
	// 公共类
	private String abstractControllerUrl;         //	公有类controller路径
	private String abstractMapperUrl;            // 公有类mapper路径
	// 主键
	private Boolean hasPrimaryKey = false;         // 是否含有主键
	private String primaryKeyFieldName;            // 主键数据库字段名称
	private String primaryKeyPropertyName;            // 主键Java字段名称
	private String primaryKeyDataBaseType;        // 主键在数据库识别的数据类型
	private String primaryKeyType;               // 主键在JAVA识别的数据类型
	// other
	private List<PropertyInfo> cis;               // 数据库每个字段的基本属性信息
	private Set<String> pkgs = new HashSet<String>();   // 需要引入公共包list
	
	public BasisInfo(String project, String author, String version, String createTime, String agile, String dbUrl, String dbName, String dbPassword, String database, String table, String entityName, String entityComment, String entityUrl, String mapperName, String mapperUrl, String mapperXmlName, String mapperXmlUrl, String serviceName, String serviceUrl, String controllerName, String controllerUrl) {
		this.project = project;
		this.author = author;
		this.version = version;
		this.createTime = createTime;
		this.agile = agile;
		this.dbUrl = dbUrl;
		this.dbName = dbName;
		this.dbPassword = dbPassword;
		this.database = database;
		this.table = table;
		this.entityName = entityName;
		this.entityComment = entityComment;
		this.entityUrl = entityUrl;
		this.mapperName = mapperName;
		this.mapperUrl = mapperUrl;
		this.mapperXmlName = mapperXmlName;
		this.mapperXmlUrl = mapperXmlUrl;
		this.serviceName = serviceName;
		this.serviceUrl = serviceUrl;
		this.controllerName = controllerName;
		this.controllerUrl = controllerUrl;
	}
}
